﻿using UnityEngine;
using System.Collections;

public class ResultNotifLabel : MonoBehaviour {

	public GUIStyle styleLabel;
	public GUIStyle smallStyleLabel ;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnGUI(){

		if (Program.isSuccess == true) {
			if(Program.score > 7){
				GUI.Button (new Rect (Screen.width / 2 - 60, 
				                      Screen.height / 2 - 50,
				                      50, 
				                      50), 
				            "Hoàn thành", 
				            styleLabel);
			}else{
				GUI.Button (new Rect (Screen.width / 2 - 40, 
				                      Screen.height / 2 - 50,
				                      50, 
				                      50), 
				            "Thất bại", 
				            styleLabel);
			}
			GUI.Button (new Rect (Screen.width / 2 - 40, 
			                      Screen.height / 2 - 12,
			                      50, 
			                      50), 
			            Program.score + " / 10", 
			            smallStyleLabel);
			GUI.Button (new Rect (Screen.width / 2 - 40, 
			                      Screen.height / 2 + 23,
			                      50, 
			                      50), 
			            Program.playTime + " s", 
			            smallStyleLabel);
		}
	}

}
